<template>
  <GoodsHeader :GoodList="GoodList" ></GoodsHeader>
  <GoodsList :GoodList="GoodList" v-if="GoodList.flag"></GoodsList>
    <Loading v-if="!GoodList.flag"></Loading>
</template>
<script>
import GoodsHeader from "@/view/NoBreak/GoodsHeader";
import GoodsList from "@/view/NoBreak/GoodsList";
import {onMounted, reactive, ref} from "vue";
import {GoodsDay} from "../../../HTTP/api";
import Loading from "@/view/Load/Loading";
export default {
  name: "Goods",
  components: {
    Loading,
    GoodsHeader,
    GoodsList
  },
  setup() {
    let GoodList = reactive({
          Songslist: [],
          flag: false
        }
    )
    let flag = ref(false)
    onMounted(async () => {
      let Songs = await GoodsDay()
      GoodList.Songslist = Songs.data.dailySongs
      GoodList.flag = true
      // console.log(GoodList.Songslist)
    })
    return {
      GoodList,
    }
  }
}
</script>
<style scoped>
</style>